#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <string.h>

int my_strcmp(const char* str1, const char* str2)
{
	int i = 0;
	for (i = 0; *(str1 + i) != '\0' || *(str2 + i) != '\0'; i++)
	{
		if (*(str1 + i) > *(str2 + i))
			return 1;
		if (*(str1 + i) < *(str2 + i))
			return -1;
	}
	return 0;
}

int main()
{
	char arr1[10] = "abcd";
	char arr2[10] = "abcde";
	char arr3[10] = "abbc";
	char arr4[10] = "abcd";
	printf("%d ", my_strcmp(arr1, arr2));
	printf("%d ", my_strcmp(arr1, arr2));
	printf("%d ", my_strcmp(arr1, arr4));
	return 0;
}